package com.hh.basic.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 黄浩
 * @create 2022-06-05 11:08
 */
@Data
public class AjaxResult {
    private Boolean success = true;
    private String message = "操作成功！";

    private AjaxResult(){}

    private static final AjaxResult ajaxResult = new AjaxResult();

    public static AjaxResult getInstance(){
        return ajaxResult;
    }
    
    public AjaxResult setSuccess(Boolean success){
        this.success = success;
        return this;
    }
    public AjaxResult setMessage(String message){
        this.message = message;
        return this;
    }
}
